package com.yss.sofa.report.engine.cell.visible.result;

import java.util.Map;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.FloatingCell;
import com.yss.sofa.report.engine.cell.ReportCell;

public class FloatingResultCell extends ResultCell{
	private static final long serialVersionUID = -1722104992220862713L;
	private FloatingCell floating;
	private int zindex;
	protected void init() {
		super.init();
		zindex=1;
	}
	public void assignTo(ReportCell cell){
		FloatingResultCell _=(FloatingResultCell)cell;
		super.assignTo(_);
		_.zindex=this.zindex;
		_.floating=this.floating.create();
	}
	public FloatingResultCell create(){
		FloatingResultCell _=new FloatingResultCell();
		this.assignTo(_);
		return _;
	}
	private FloatingResultCell(){
		super();
		this.floating=null;
	}
	private FloatingResultCell(FloatingCell floating){
		this();
		this.floating=floating;
	}
	public FloatingResultCell(FloatingCell from,int zindex){
		this(from);
		this.rfrom=-1;
		this.cfrom=-1;
		this.top=from.getTop();
		this.left=from.getLeft();
		this.dataType=Const.CELL_DATA_TYPE_IMG;
		//this.autoMerge=true;
		this.move=Const.CELL_MOVE_ABS;
		this.rbegin=from.getTop();
		this.rend=from.getBottom();
		this.cbegin=from.getLeft();
		this.cend=from.getRight();
		this.style="";
		this.mergeTimes=1;
		this.forceMerge="";
		this.zindex=zindex;
		this.html="";
		this.fromRbegin=from.getTop();
		this.fromRend=from.getBottom();
		this.fromCbegin=from.getLeft();
		this.fromCend=from.getRight();
	}

	public String getValue() {
		return null;
	}
	
	public Map<String,String> getRecord(){
		return null;
	}
	
	public Map<String,String> getAttr(){
		return null;
	}
	
	public FloatingCell getFloating(){
		return floating;
	}
	public int getZindex() {
		return zindex;
	}
	public void setZindex(int zindex) {
		this.zindex = zindex;
	}
}
